package com.stenio.fancat.mapper.baby;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.stenio.fancat.domain.baby.BabyPartner;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BabyPartnerMapper extends BaseMapper<BabyPartner> {

    /**
     * 查询宝宝伙伴
     * @param babyId
     * @return
     */
     List<BabyPartner> selectBabyPartnerByBid(String babyId);


    /**
     * 查询已经邀请的小伙伴
     * @param babyId
     * @return
     */
     List<BabyPartner> selectBabyPartnerByBid2(String babyId);
       /**
     * 当前宝宝有多少伙伴
     * @param babyId
     * @return
     */
    Integer selectCountPartners(String babyId);


    /**
     * 判断这两个宝宝是否已经有过关联  --------判断是否能邀请
     * @param babyId
     * @param associatedBabyId
     * @return
     */
    BabyPartner isInvitePartner(String babyId, String associatedBabyId);


    /**
     * 修改baby的领取candy状态
     * @param babyId
     * @param associatedBabyId
     * @return
     */
    Integer modifyState(String babyId,String associatedBabyId);

}
